
#include<iostream>
#include<stack>
#include<queue>
using namespace std;

int main()
{
	queue<int> q;
	int num;

	cout<<"------Test for Queue-------"<<endl;
	cout<<"Input number:"<<endl;
	while(cin>>num)
	{
		q.push(num);
	}
	cout<<"Now the Queue has "<<q.size()<<" numbers."<<endl;
	cout<<"The first is "<<q.front()<<endl;
	cout<<"The last is "<<q.back()<<endl;
	cout<<"All numbers："<<endl;
	while(!q.empty())
	{
		cout<<q.front()<<" ";
		q.pop();
	}
	cout<<"Now the Queue has "<<q.size()<<" numbers."<<endl;


}
